-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit warning filter #1534
base: master
Are you sure you want to change the base?
Audit warning filter #1534
Conversation
Fixes all warnings for 3.12 _______________________________________________________ test_nwb_has_external_links _______________________________________________________ .tox/py3/lib/python3.12/site-packages/hdmf/build/objectmapper.py:1107: in __add_datasets data, dtype = self.convert_dtype(spec, attr_value) .tox/py3/lib/python3.12/site-packages/hdmf/build/objectmapper.py:264: in convert_dtype warnings.warn(full_warning_msg, DtypeConversionWarning) E hdmf.build.warnings.DtypeConversionWarning: Spec 'TimeSeries/timestamps': Value with data type int64 is being converted to data type float64 as specified.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1534 +/- ##
=======================================
Coverage 88.53% 88.53%
=======================================
Files 78 78
Lines 10691 10691
=======================================
Hits 9465 9465
Misses 1226 1226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
FWIW, the no-longer-filtered warnings show up as noise in the test run on CI (its a very noisy run , but do NOT cause failures. @yarikoptic is it sufficient to filter only warnings that are escalated to failures, or are we aiming to slightly reduce the noise? Some warnings in CI logs https://github.com/dandi/dandi-cli/actions/runs/11946325336/job/33300465114?pr=1534/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampStimulusSeries 'ccss' is ignored and will be set to 'amperes' as per NWB 2.1.0. |
I've tested locally with python 3.9 and 3.12.
I ran the tests with
tox -e 39
andtox -e 312
. Since this was sufficient for both, I figure lets let the automation run to see where we are-- I'm surprised that we dont need more filters tbh.FWIW, there were ~20 warnings when I was testing without the
error
in filterwarnings. I was quite surprised that adding this in removed all but 1 of those warnings (the one filtered here). (I had expected that those warnings would be promoted to errors).Warnings without `filterwarnings == error`
============================================================ warnings summary =============================================================
dandi/tests/test_download.py::test_DownloadDirectory_basic
dandi/tests/test_download.py::test_DownloadDirectory_basic
/usr/lib64/python3.12/multiprocessing/popen_fork.py:66: DeprecationWarning: This process (pid=753514) is multi-threaded, use of fork() may lead to deadlocks in the child.
self.pid = os.fork()
dandi/tests/test_fixtures.py: 20 warnings
dandi/tests/test_organize.py: 20 warnings
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/joblib/externals/loky/backend/fork_exec.py:38: DeprecationWarning: This process (pid=753514) is multi-threaded, use of fork() may lead to deadlocks in the child.
pid = os.fork()
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ecephys.py:223: DeprecationWarning: use pynwb.misc.Units or NWBFile.units instead
warnings.warn("use pynwb.misc.Units or NWBFile.units instead", DeprecationWarning)
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ecephys.py:257: DeprecationWarning: use pynwb.misc.Units or NWBFile.units instead
warnings.warn("use pynwb.misc.Units or NWBFile.units instead", DeprecationWarning)
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampSeries 'ccs' is ignored and will be set to 'volts' as per NWB 2.1.0.
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for CurrentClampStimulusSeries 'ccss' is ignored and will be set to 'amperes' as per NWB 2.1.0.
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:226: UserWarning: Stimulus description 'NA' for IZeroClampSeries 'izcs' is ignored and will be set to 'N/A' as per NWB 2.3.0.
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for IZeroClampSeries 'izcs' is ignored and will be set to 'volts' as per NWB 2.1.0.
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:341: DeprecationWarning: Use of SweepTable is deprecated. Use the IntracellularRecordingsTable instead. See also the NWBFile.add_intracellular_recordings function.
warnings.warn("Use of SweepTable is deprecated. Use the IntracellularRecordingsTable "
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:116: DeprecationWarning: The 'manifold' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.
warnings.warn("The 'manifold' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.",
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:119: DeprecationWarning: The 'conversion' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.
warnings.warn("The 'conversion' argument is deprecated in favor of 'origin_coords' and 'grid_spacing'.",
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/ophys.py:122: DeprecationWarning: The 'unit' argument is deprecated in favor of 'origin_coords_unit' and 'grid_spacing_unit'.
warnings.warn("The 'unit' argument is deprecated in favor of 'origin_coords_unit' and 'grid_spacing_unit'.",
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': The number of frame indices in 'starting_frame' should have the same length as 'external_file'.
warn(error_msg)
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/core.py:48: UserWarning: ImageSeries 'test_iS': Format must be 'external' when external_file is specified.
warn(error_msg)
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/image.py:106: UserWarning: TwoPhotonSeries 'test_2ps': Length of data does not match length of timestamps. Your data may be transposed. Time should be on the 0th dimension
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampSeries 'vcs' is ignored and will be set to 'amperes' as per NWB 2.1.0.
warnings.warn(
dandi/tests/test_organize.py::test_organize_nwb_test_data[1-dry]
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/pynwb/icephys.py:22: UserWarning: Unit 'A' for VoltageClampStimulusSeries 'vcss' is ignored and will be set to 'volts' as per NWB 2.1.0.
warnings.warn(
dandi/tests/test_pynwb_utils.py::test_nwb_has_external_links
/home/austin/devel/dandi-cli/.tox/py3/lib/python3.12/site-packages/hdmf/build/objectmapper.py:264: DtypeConversionWarning: Spec 'TimeSeries/timestamps': Value with data type int64 is being converted to data type float64 as specified.
warnings.warn(full_warning_msg, DtypeConversionWarning)